package com.example.listener;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.ServletRequestEvent;
import javax.servlet.ServletRequestListener;
import javax.servlet.annotation.WebListener;

@WebListener
public class MyListener2 implements ServletRequestListener {
    @Override
    public void requestDestroyed(ServletRequestEvent sre) {
        System.out.println("在请求对象被销毁时得到通知");
    }

    @Override
    public void requestInitialized(ServletRequestEvent sre) {
        System.out.println("在请求对象初始化时得到通知");
    }
}
